package com.sale24h.tasks;

import java.util.ArrayList;
import java.util.List;

import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

import android.content.Context;

import com.example.serverconnect.BaseAsyncTask;
import com.example.serverconnect.ITaskListener;
import com.example.serverconnect.JSONParser;
import com.sale24h.data.AppData;

public class GetXuatbanChiTietTask extends BaseAsyncTask
{
	private String url="get_xuatban_chitiet.php";
	private JSONParser jParser=new JSONParser();

	public GetXuatbanChiTietTask(ITaskListener listener, Context context)
	{
		super(listener, context);
		this.url=baseUrl+this.url;
		// TODO Auto-generated constructor stub
	}	

	@Override
	protected String doInBackground(String... arg0)
	{
		String macurrentban=AppData.getInstance().getCurrentBan().getTenban();
		
		 List<NameValuePair> args = new ArrayList<NameValuePair>();
		 args.add(new BasicNameValuePair("soban", String.valueOf(macurrentban)));
         // getting JSON string from URL
         this.obj = jParser.makeHttpRequest(url, "GET", args);
		return null;
	}

}
